package com.heima.common.util;

import com.heima.common.dto.User;

public class UserThreadLocalUtil {
    private static ThreadLocal<User> TL = new ThreadLocal<>();

    public static User getUser() {
        return TL.get();
    }

    public static void setUser(User user) {
        TL.set(user);
    }

    public static void removeUser() {
        TL.remove();
    }
}
